import request from '@/utils/request'

// 渲染
export function getadvListApi(params) {
  return request({
    url: '/content/adv',
    method: 'get',
    params
  })
}
// 小区下拉框
export function getComListApi() {
  return request({
    url: '/community',
    method: 'get'
  })
}
// 回显
export function getadvInfoApi(id) {
  return request({
    url: '/content/adv/' + id,
    method: 'get'
  })
}
// 更改
export function editadvApi(data) {
  return request({
    url: '/content/adv/' + data.id,
    method: 'PUT',
    data
  })
}
// 添加
export function addadvApi(data) {
  return request({
    url: '/content/adv',
    method: 'post',
    data
  })
}
// 删除
export function deladvApi(id) {
  return request({
    url: '/content/adv/' + id,
    method: 'DELETE'
  })
}
